// 登录接口需要携带的参数 ts 类型
export interface LoginForm {
  username: string;
  password: string;
}

interface DataType {
  token?: string;
  message?: string;
}

// 登录接口返回数据类型
export interface LoginResponseData {
  code: number;
  data: DataType;
}

interface UserInfo {
  userId: number;
  avatar: string;
  username: string;
  password: string;
  desc: string;
  roles: string[];
  buttons: string[];
  routes: string[];
  token: string;
}

interface User {
  checkUser: UserInfo;
}

// 定义服务器返回用户信息相关的数据类型
export interface UserResponseData {
  code: number;
  data: User;
}
